Ext.define('DCApp.Application', {
    extend: 'Ext.app.Application',
    
    name: 'DCApp',
    requires: [
    		'Ext.app.bindinspector.*',
               'Ext.app.*',
               'Ext.state.CookieProvider',
               'Ext.window.MessageBox',
               'Ext.tip.QuickTipManager',
               'DCApp.*'
           ],
   controllers: [
         'Global',
         'Direct'
     ],

    stores: [
        // TODO: add global / shared stores here
    ],
    
    onBeforeLaunch: function () {
        // All smoke-and-mirrors with data happens in SimData. This is a fake server that
        // runs in-browser and intercepts the various Ajax requests a real app would make
        // to a real server.
        DCApp.SimData.init();
        this.callParent();
    },
    init: function() {
        Ext.create('DCApp.store.Navigation', {
            storeId: 'navigation'
        });
        this.setDefaultToken('all');

        Ext.setGlyphFontFamily('Pictos');
        Ext.tip.QuickTipManager.init();
        
        // if (!Ext.microloaderTags.test) {
            Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));
       // }
    }
    
});
